;;===============================================================
;; Unit tests core
;; note: the way we invoke private functions is using the reader macros @#'
;; for quoting and then dereferencing. In the start we thought about using the
;; 'with-private-fns' macro below taken from http://nakkaya.com/2009/11/18/unit-testing-in-clojure/
;; but using @#' is more compact and simple. 
;;===============================================================
(ns strclj.core-test
  (:use clojure.test
        strclj.core))

(defmacro with-private-fns [[ns fns] & tests]
  "Refers private fns from ns and runs tests in context."
  `(let ~(reduce #(conj %1 %2 `(ns-resolve '~ns '~%2)) [] fns)
     ~@tests))